<ion-view view-title="产品搜索" cache-view="false">
	<!-- 返回 -->
	<ion-nav-buttons side="left">
		<back-button ng-show="hideTabs"></back-button>
		<div class="kSearch">
			<input type="search" ng-model="search.conditions" ng-change="search()" placeholder="请输入产品代码/简称首字母/简称">
			<a ng-click="search.conditions = '';search()" class="kClearEnter" ng-show="search.conditions.length > 0"></a>
		</div>
		<input type="submit" value="取消" ng-click="onBackKeyDown()">
	</ion-nav-buttons>
	<!-- content -->
	<ion-content>
		<div class="kSearchList">
			<em ng-show="!hasSearch">历史搜索</em>
			<ul ng-show="!hasSearch">
				<li ng-repeat="h in historySearch">
					<a href="#/{{h.href}}/{{h.prod_code}}">{{h.prod_name}}<em>{{h.prod_code}}&nbsp;{{h.prod_catalog_name}}</em></a>
					<input type="checkbox" ng-checked="h.isConcern" class="kAttention">
				</li>
			</ul>
			<a ng-click="cleanSearch()" ng-show="!hasSearch && historySearch.length > 0">清除搜索历史</a>
			<a ng-show="!hasSearch && historySearch.length == 0">暂无搜索历史</a>

			<ul ng-show="hasSearch">
				<li ng-repeat="h in searchResult">
					<a ng-href="#/{{h.href}}/{{h.prod_code}}" ng-click="addHistorySearch(h)" ng-bind-html="h.prod_name_show">
					</a>
					<input type="checkbox" ng-checked="h.isConcern" class="kAttention" ng-click="operUserCare(h.prod_code)" >
				</li>
				<li class="tac" ng-show="searchResult.length == 0">抱歉，没有找到你查找的产品！<br>找场内基金？请到股票行情页！</li>
				<li class="tac" ng-show="searchResult.length > 0 && !vm.loadMore" > 暂无更多匹配结果</li>
			</ul>

		</div>

		<ion-infinite-scroll on-infinite="loadMore()" distance="1%" ng-if="vm.loadMore">
		</ion-infinite-scroll>

	</ion-content>

	<to-top></to-top>

</ion-view>